package main

import "fmt"

func testChannel(){
	message:= make(chan string)
	go func(){
		message <- "ping"
	}()
	msg := <-message
	fmt.Println(msg)
}

func testChannelBuffer(){
	message:= make(chan string,2)
	go func(){
		message <- "ping"
		message <- "pong"
	}()
	fmt.Println(<-message)
	fmt.Println(<-message)
}
